package com.jumi.microservice.enumerate;

import com.jumi.microservice.common.base.dto.AbstractEnum;

import javax.security.sasl.SaslServer;

/**
 * @author Dirk
 * @Date 2020-08-04 14:42
 */
public enum OrderStatusEnum implements AbstractEnum<Byte> {

    /**
     * 订单状态 0-已取消 1-待付款 2-待发货 3-待收货 4-已完成
     */
    CANCEL(0, "已取消"),
    READY_TO_PAY(1, "待付款"),
    READY_TO_SHIP(2, "待发货"),
    READY_TO_RECEIVE(3, "待收货"),
    COMPLETED(4, "已完成");

    private Byte code;

    private String message;

    OrderStatusEnum(Integer code, String message) {
        this.code = code.byteValue();
        this.message = message;
    }

    @Override
    public Byte getCode() {
        return code;
    }

    public void setCode(Byte code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
